package com.yanqu.road.entity.activity.stronghold;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.player.UserBaseInfo;

import java.math.BigInteger;
import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_c_activity_stronghold_user_round_damage")
public class CrossStrongholdUserRoungDamage extends DataObject {
    @FieldTypeAnnotation(select = true,update = true)
    private int activityId;
    @FieldTypeAnnotation(update = true)
    private String unionId;
    @FieldTypeAnnotation(update = true)
    private long userId;
    @FieldTypeAnnotation(update = true)
    private int round;
    @FieldTypeAnnotation
    private BigInteger damage;
    @FieldTypeAnnotation
    private UserBaseInfo userBaseInfo;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public String getUnionId() {
        return unionId;
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public int getRound() {
        return round;
    }

    public void setRound(int round) {
        this.round = round;
    }

    public BigInteger getDamage() {
        return damage;
    }

    public void setDamage(BigInteger damage) {
        if (!Objects.equals(this.damage, damage)) {
            this.damage = damage;
            setUpdateOption();
        }
    }

    public UserBaseInfo getUserBaseInfo() {
        return userBaseInfo;
    }

    public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
        if (userBaseInfo == null) {
            userBaseInfo = new UserBaseInfo();
        }
        this.userBaseInfo = userBaseInfo;
        setUpdateOption();
    }
}
